using NUnit.Framework;
using Conusic;

namespace ConusicTests
{
    [TestFixture()]
    public class StringComparerOnlyCharsTest
    {
        [Test()]
        public void TestSameWords()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals("welcome to mall", "welcome to mall"));
        }

        [Test()]
        public void TestWordsSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals(" f u  c k ", "fu c   k "));
        }

        [Test()]
        public void TestSimpleWordSecondSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals("test", "t e s t"));
        }

        [Test()]
        public void TestSimpleSameWithSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals("test ", "test "));
        }

        [Test()]
        public void TestPuntuation()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals(" punc......tua,,,,,,tion", "punctuation"));
        }

        [Test()]
        public void TestCultureCases()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(true, k.Equals("ПРивет, рыбка МОя!", "приветрыбкамоя"));
        }

        [Test()]
        public void TestWrondCompare()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(false, k.Equals(" f u  c k ", "fu k   k "));
        }
    }


    [TestFixture()]
    public class CompareTests
    {
        [Test()]
        public void TestSameWords()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare("welcome to mall", "welcome to mall"));
        }

        [Test()]
        public void TestWordsSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare(" f u  c k ", "fu c   k "));
        }

        [Test()]
        public void TestSimpleWordSecondSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare("test", "t e s t"));
        }

        [Test()]
        public void TestSimpleSameWithSpaces()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare("test ", "test "));
        }

        [Test()]
        public void TestPuntuation()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare(" punc......tua,,,,,,tion", "punctuation"));
        }

        [Test()]
        public void TestCultureCases()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreEqual(0, k.Compare("ПРивет, рыбка МОя!", "приветрыбкамоя"));
        }

        [Test()]
        public void TestWrondCompare()
        {
            var k = new StringComparerOnlyChars();
            Assert.AreNotEqual(0, k.Compare(" f u  c k ", "fu k   k "));
        }
    }
}